<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>百度</title>
  <script>
    function show({ s }) {
      s.forEach(item => {
        let lis = document.createElement('li');
        lis.innerHTML = item;
        document.querySelector('#ul1').append(lis)
      })
    }
    window.onload = function () {
      let input1 = document.querySelector('#input1');

      input1.oninput = function () {
        document.querySelector('#ul1').innerHTML = ''
        console.log(this.value);
        let url = `https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=${this.value}&cb=show`
        let csript = document.createElement('script');
        csript.src = url
        document.head.appendChild(csript);


      }


    }

  </script>
</head>

<body>
  <input type="text" id="input1">
  <ul id="ul1"></ul>

</body>

</html>